<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="/fuman/js/purchase.js" ></script>

<script>
function addorder()
{
	$('#addstorageform').modal('show');	
}
function stoorder()
{
  $('#staddstorageform').modal('show');	
}
function onsavehand()
{
	var tostock = $("#tostock").val();
	if(tostock =="")
	{
		alert("请指定入库仓库！");
		return;	
	}
	var goodslist = $("#goodslist").val();
	if(goodslist =='')
	{
		alert("请填写入库SKU");
		return;	
	}
	$("#attributeform").submit();
	$("#addstorageform").modal('hide');	
}

function newonsavehand()
{
	var istostock = $("#istostock").val();
	if(istostock =="")
	{
		alert("请指定出库仓库！");
		return;	
	}
	var togoodslist = $("#togoodslist").val();
	if(togoodslist =='')
	{
		alert("请填写入库SKU");
		return;	
	}
	$("#newattributeform").submit();
	$("#staddstorageform").modal('hide');		
}

function delstock(id)
{
		$.post("/purchase/ajaxbutton", {"op": "delstock","id":id},
	  function(data){
			document.location.href = "/purchase/handstorage";
	   },"json");
}
function confirk(id)
{
	$("#co"+id).hide();
	$.post("/purchase/ajaxbutton", {"op": "confirk","id":id},
  function(data){
		document.location.href = "/purchase/handstorage";
   },"json");	
}
</script>

<title>仓位查询结果</title>
<body class="withvernav">
<div class="bodywrapper">
{{include file='/public/orderleft.tpl'}}
<div class="centercontent">
  <div class="pageheader notab">
    <h1 class="pagetitle">仓位商品查询结果</h1>
    <span class="pagedesc"><br></span>
    <div class="menulist">
    <ul class="profile_summary">
    	<li><a href="/purchase/inputstock"><span>盘点日志列表</span></a></li>
        <li><a href="/purchase/handinputstock"><span>盘点操作</span></a></li>
        <li class="current"><a href="/factorydetail/ajaxbutton?op=stockGoods"><span>查询仓位商品</span></a></li>
        <li><a href="/factorydetail/ajaxbutton?op=importGoodsStock"><span>导入盘点商品</span></a></li>
	</ul>
  </div>
  </div>
  <!--pageheader-->
  <div id="contentwrapper" class="contentwrapper">
    <form class="stdform stdform2" method="get" action="/report/fbaGoodsRank">
      <div class="tableoptions" style="text-align:right;">
        <span class="page" style="border:none"></span>
                
                 <span class="page" style="border:none;"><a href='javascript:history.back()'>返回上页</a></span>&nbsp;&nbsp;
            {{if $stock_list[0] neq  ''}}
                <span class="page" style="border:none;"><a href="javascript:exportExl();">导出结果到Excel</a></span>
            {{/if}} 总记录数：<strong style="color:red;">{{$total_datas}}</strong>条
        
      </div>
    </form>
    <!--搜索栏结束-->
    <table cellpadding="0" cellspacing="0" border="0" class="stdtable" style="table-layout: fixed;">
      <thead>
        <tr class="lbbt">
          <td bgcolor="#FEFFF1">NO.</td>
          <td bgcolor="#FEFFF1">仓库</td>
          <td  bgcolor="#FEFFF1">仓位</td>
          <td  bgcolor="#FEFFF1">商品sku</td>
          <td  bgcolor="#FEFFF1">商品id</td>
          <td  bgcolor="#FEFFF1" width="30%">商品名称</td>
          <td  bgcolor="#FEFFF1" >现库存数</td>
           <td  bgcolor="#FEFFF1">盘点库存数</td>
        </tr>
      </thead>
      <tbody >
      
      {{foreach from=$stock_list item=li key=key}}
      <tr>
        <td valign="middle" style="position:relative;">{{$key+1}}</td>
        <td valign="middle" style="position:relative;">{{$li.storage_name}}</td>
       
        <td valign="middle">{{$g_positions[$li.goods_id]}}</td>
        <td style="position:relative;">{{$li.goods_sku}}</td>
        <td >{{$li.goods_id}}</td>
        <td valign="middle">{{$li.goods_name}}</td>
        <td class="cz">{{$li.stock}}</td>
        <td valign="middle"></td>
      </tr>
      {{/foreach}}         
        </tbody>
    </table>
  </div>
</div>
<script type="text/javascript" src="/fuman/js/report.js"></script>
</body>
</html>